package com.nmf.pc.enums.goods;

import com.nmf.site.common.excep.KideException;
import com.nmf.site.common.excep.KideExpCode;

public enum GoodStatus {
	NOMAL(1, "正常"),
	;

	public Integer value;
	public String name;

	GoodStatus(int value, String name) {
		this.value = value;
		this.name = name;
	}

	public static GoodStatus getStatus(Integer value) {
		if (value != null) {
			GoodStatus[] otypes = GoodStatus.values();
			for (GoodStatus memberType : otypes) {
				if (value.equals(memberType.value)) {
					return memberType;
				}
			}
		}
		throw new KideException(KideExpCode.ENUMS_ERROR, value+"");
	}
}
